const mongoose = require('mongoose');
const { Schema } = mongoose;

const customerInfoSchema = new Schema({
  username: String,//用户名
  sex: String,//性别
  name: String,// 姓名
  phone: String,//手机
  address: String,//地址
  userType: Number,//用户类型
  discount: Number,//折扣
  registDate: Date,//注册日期
  carInfo: {//车辆信息
    brand: String,//品牌
    model: String,//型号
    color: String,//颜色
    carId: String,//车牌
  }
});

const customerInfoModel = mongoose.model('customerInfo',customerInfoSchema);

module.exports = customerInfoModel;